<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <title>
        用户列表
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet"href="/houtaistatic/css/x-admin.css" media="all">


    <style type="text/css">
        /*设置 a 标签的css样式*/

        .page-normal a {
            border: 1px solid #ff6500;
            padding: 5px 7px;
            color: #ff6500;
            margin-left: 20px;
            /*设置标签 a 之间的间隔*/
            text-decoration: none;
            /*去除页码数字下面的下划线*/
        }
        /*设置鼠标经过时 a 标签的css样式*/

        .page-normal a:hover {
            background-color: #ffbe94;
        }
        /*设置整个div的css样式,该样式主要用于设置网页内的省略号 …… 的样式，并且同时设置内容居中显示*/

        .page-normal {
            color: #ff6500;
            text-align: center;
        }
        /*设置当前页面的css样式*/

        .page-normal .page-current {
            color: #ffffff;
            background-color: #ff6500;
        }
        /*设置左单括号 < 的css样式*/

        .page-normal .page-prev {
            color: #ffe3c6;
        }
        /*进行代码优化，将不同css样式中共有的属性放在一起，有助于提高运行效率*/

        .page-normal a,
        .page-normal a:hover,
        .page-normal .page-prev,
        .page-normal .page-current {
            border: 1px solid #ff6500;
            padding: 5px 7px;
        }
    </style>
</head>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
              <a><cite>首页</cite></a>
              <a><cite>用户管理管理</cite></a>
              <a><cite>用户列表</cite></a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"  href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <form class="layui-form x-center" action="" style="width:80%">
        <div class="layui-form-pane" style="margin-top: 15px;">
            <div class="layui-form-item">
                <form action="/user_list" method="post">
                    <label class="layui-form-label">日期范围</label>
                    <div class="layui-input-inline">
                        <input type="date" class="layui-input" th:value="${begindate}" name="begin" title="创建时间" id="LAY_demorange_s">
                    </div>
                    <div class="layui-input-inline">
                        <input  type="date" class="layui-input" th:value="${enddate}" name="end" title="截止时间" id="LAY_demorange_e">
                    </div>
                    <div class="layui-input-inline">
                        <input type="text"  name="phone_email" th:value="${phone_email}"  placeholder="请输入手机/邮箱" autocomplete="off" class="layui-input">
                        <input type="hidden" name="index" th:value="${page.currentPageNo}">
                    </div>
                    <div class="layui-input-inline" style="width:80px">
                        <button class="layui-btn" type="submit"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
                    </div>
                </form>
            </div>
        </div>
    </form>
    <span class="x-right" style="line-height:40px">共有数据：<a th:text="${page.totalCount}"></a> 条</span>
    <table class="layui-table">
        <thead>
        <tr>

            <th>
                ID
            </th>
            <th>
                昵称
            </th>
            <th>
                手机
            </th>
            <th>
                邮箱
            </th>
            <th>
                密码
            </th>
            <th>
                头像名称
            </th>
            <th>
                头像地址
            </th>
            <th>
                出生日期
            </th>
            <th>
                居住地址
            </th>
            <th>
                创建时间
            </th>
            <th>
                修改时间
            </th>
            <th>
                状态
            </th>
            <th>
                操作
            </th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="list:${userlist}">
            <td th:text="${list.id}"></td>
            <td th:text="${list.name}"></td>
            <td th:text="${list.phone}"></td>
            <td th:text="${list.email}"></td>
            <td th:text="${list.password}"></td>
            <td th:text="${list.imgname}"></td>
            <td th:text="${list.imgurl}"></td>
            <td th:text="${#dates.format(list.birthday,'yyyy-MM-dd')}"></td>
            <td th:text="${list.Address}"></td>
            <td th:text="${#dates.format(list.createDate,'yyyy-MM-dd')}"></td>
            <td th:text="${#dates.format(list.modify,'yyyy-MM-dd')}"></td>
            <td class="td-status">
                            <span th:if="${list.state} eq '1'" class="layui-btn layui-btn-normal layui-btn-mini">
                                正常
                            </span>
                <span th:if="${list.state} eq '2'" class="layui-btn layui-btn-mini">
                                已被拉黑
                            </span>
            </td>
            <td class="td-manage">
                <a th:if="${list.state} eq '1'" th:href="'/updateStates?upphone='+${list.phone}" style="text-decoration:none"  title="拉黑">
                    <i class="layui-icon">&darr;</i>
                </a>
                <a th:if="${list.state} eq '2'" th:href="'/updateStates?upphone='+${list.phone}" style="text-decoration:none"  title="取消拉黑">
                    <i class="layui-icon">&uarr;</i>
                </a>

            </td>
        </tr>
        </tbody>
    </table>

    <div class="page-normal" th:if="${page.totalPageCount} gt 1">

        <a   th:if="${page.currentPageNo} gt 1"  th:href="@{'/user_list?index='+${page.currentPageNo-1}+'&begin='+${begindate}+'&end='+${enddate}+'&phone_email='+${phone_email}}" >&lt;</a>
        <!-- 数字1 代表当前页面-->
        <a class="page-current" th:href="@{'/user_list?index=1&begin='+${begindate}+'&end='+${enddate}+'&phone_email='+${phone_email}}">首页</a>
        <a class="page-current" th:text="${page.currentPageNo}"></a>
        <a th:href="@{'/user_list?index='+${page.totalPageCount}+'&begin='+${begindate}+'&end='+${enddate}+'&phone_email='+${phone_email}}">最后一页</a>
        <a th:if="${page.currentPageNo} lt ${page.totalPageCount}" th:href="'/user_list?index='+${page.currentPageNo+1}+'&begin='+${begindate}+'&end='+${enddate}+'&phone_email='+${phone_email}" >&gt;</a>
    </div>

</div>
<script type="text/javascript" src="/houtaistatic/js/jquery.min.js"></script>


</body>
</html>